home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / software / business / updates_and_patches / ts25b.lha / 2.5bUpdate / Install-TypeSmith2.5b next >
Text File  |  1995-10-01  |  3KB  |  76 lines

  1. ;TypeSmith 2.5b ONLINE UPDATE PATCH INSTALLATION SCRIPT
  2. ;COPYRIGHT ©1995 SOFT-LOGIK PUBLISHING CORPORATION
  3.  
  4. ;SEE IF TYPESMITH IS ASSIGNED
  5. (set TSdest (getassign "TypeSmith" "a"))
  6. (if
  7.     (= TSdest "")
  8.     (abort "TypeSmith: is not assigned. You must properly install TypeSmith 2.5 before applying this update patch.")
  9. )
  10.  
  11. (message "\n\nThis will create TypeSmith 2.5b from your TypeSmith 2.5 or 2.5a TSprogram floppy disk and the patch file included with this installation script. Your disk will not be modified.\n\nIf the patch is successfully applied, 2.5b will be saved as TypeSmith:TypeSmith. Your copy of 2.5 or 2.5a will be preserved as TypeSmith:TypeSmith2.5 or TypeSmith2.5a.")
  12.  
  13. ;REQUEST DISK
  14. (askdisk
  15.     (prompt "\n\n\nPlease insert the disk labeled \"TSprogram\".")
  16.     (help
  17.         "You must insert your TypeSmith 2.5 or 2.5a floppy disk in a drive to complete the installation.")
  18.     (dest "TSprogram")
  19. )
  20. (copyfiles (source "TSprogram:lhex") (dest "ram:") (nogauge))
  21. (set OldSize (getsize "TSprogram:TypeSmith"))
  22.  
  23. ;UPDATE TYPESMITH
  24. (working "Patching TypeSmith to 2.5b...")
  25.  
  26. (if (= OldSize 454668)
  27.     (
  28.         (delete "TSpatchAB.LHA" (safe))
  29.         (run "ram:lhex >NIL: <NIL: -qfw=ram: x TSpatch0B.LHA")
  30.         (run "spatch >NIL: <NIL: -oram:TypeSmithB -pram:TypeSmith0B.pch TSprogram:TypeSmith")
  31.         (delete "TSpatch0B.LHA" (safe))
  32.         (delete "ram:TypeSmith0B.pch" (safe))
  33.     )
  34.     (
  35.         (delete "TSpatch0B.LHA" (safe))
  36.         (run "ram:lhex >NIL: <NIL: -qfw=ram: x TSpatchAB.LHA")
  37.         (run "spatch >NIL: <NIL: -oram:TypeSmithB -pram:TypeSmithAB.pch TSprogram:TypeSmith")
  38.         (delete "TSpatchAB.LHA" (safe))
  39.         (delete "ram:TypeSmithAB.pch" (safe))
  40.     )
  41. )
  42.  
  43. (if (exists "ram:TypeSmithB")
  44.     (
  45.         (if (= OldSize 454668)
  46.             (rename "TypeSmith:TypeSmith" "TypeSmith:TypeSmith2.5")
  47.             (rename "TypeSmith:TypeSmith" "TypeSmith:TypeSmith2.5a")
  48.         )
  49.         (copyfiles (source "ram:TypeSmithB") (dest TSdest))
  50.         (rename "TypeSmith:TypeSmithB" "TypeSmith:TypeSmith")
  51.         (delete "ram:TypeSmithB" (safe))
  52.     )
  53.     (abort "Patch was not successful. Cause was probably lack of RAM, a bad disk, or an incorrect version of TypeSmith.")
  54. )
  55.  
  56. ;INSTALL README
  57. (run "ram:lhex >NIL: <NIL: -qfw=TypeSmith: x Read.LHA")
  58. (delete "Read.LHA" (safe))
  59.  
  60. ;DISPLAY README (Try 3 different ways!)
  61. (run "ram:lhex >NIL: <NIL: -qfw=TypeSmith: x Read.LHA")
  62. (delete "Read.LHA" (safe))
  63. (IF (> (run "Sys:Utilities/MultiView TypeSmith:ReadMe.Now") 0)
  64.     (IF (> (run "Sys:Utilities/AmigaGuide TypeSmith:ReadMe.Now") 0)
  65.         (run "More TypeSmith:ReadMe.Now")
  66.     )
  67. )
  68.  
  69. ;REMOVE THE LHEX PROGRAM
  70. (delete "ram:lhex" (safe))
  71. (delete "spatch" (safe))
  72. (delete "Install-TypeSmith2.5b.info" (safe))
  73.  
  74. ;GEE, THAT WAS FUN
  75. (exit "TypeSmith 2.5b installed!")
  76.